<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"  xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="mall/advert/include::header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content animated fadeInRight">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-title">
						<h5></h5>
					</div>
					<div class="ibox-content">
						<form class="form-horizontal m-t" id="signupForm">
							<input type="hidden" id="id" name="id" th:value="${storeEvents.id}">
							<div class="form-group">
								<label class="col-sm-3 control-label">活动名称:</label>
								<div class="col-sm-8">
									<input id="title" name="title" class="form-control" type="text" th:value="${storeEvents.title}" readonly="readonly">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">活动类型:</label>
								<div class="col-sm-8">
									<label class="radio-inline">
										<input th:field="*{storeEvents.type}" type="radio" name="type" value="1" checked/>满减
									</label>

								</div>
							</div>

							<div class="form-group">
								<label class="col-sm-3 control-label">达标金额:</label>
								<div class="col-sm-8">
									<input id="condition" name="condition" class="form-control" type="text" min="0" th:value="${storeEvents.condition}" readonly>
								</div>
							</div>

							<div class="form-group">
								<label class="col-sm-3 control-label">减免金额:</label>
								<div class="col-sm-8">
									<input id="amount" name="amount" class="form-control" type="text" min="0" th:value="${storeEvents.amount}">
								</div>
							</div>

							<input id="centreId" name="centreId" th:value="${storeEvents.centreId}" type="hidden">
							<input type="hidden" id="teamId" name="teamId" th:value="${storeEvents.teamId}" >

							<div class="form-group text-center">
								<div class="col-sm-8 col-sm-offset-2">
									<button type="submit" class="btn btn-primary"><i class="fa fa-check"></i>提交</button>
									<div class="btn btn-danger" onclick="closeDow()"><i class="fa fa-remove"></i> 关闭</div>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div th:include="mall/advert/include::footer"></div>
	<script type="text/javascript" src="/js/appjs/promotion/storeEvents/edit.js">
	</script>
	<script type="text/javascript">
		$(function(){
		    var isOpen= $('#isShow').val();
            $(":radio[name='isOpen'][value='" + isOpen + "']").prop("checked", "checked");
		});
		function closeDow() {
			var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
			parent.layer.close(index);
		}
        $(function(){
            $("#amount").keyup(function () {
                $("#amount").val($("#amount").val().replace(/[^0-9.]/g, ''));
            }).bind("paste", function () {
                $("#amount").val($("#amount").val().replace(/[^0-9.]/g, ''));
            })
        });
        $(function(){
            $("#condition").keyup(function () {
                $("#condition").val($("#condition").val().replace(/[^0-9.]/g, ''));
            }).bind("paste", function () {
                $("#condition").val($("#condition").val().replace(/[^0-9.]/g, ''));
            })
        });
	</script>
</body>

</html>
